import { createElement, createTextNode, mount, patch } from './vdom';
const oldVnode = createElement('ul', {},
    createElement('li', { key: 'A' }, createTextNode('A')),
    createElement('li', { key: 'B' }, createTextNode('B')),
    createElement('li', { key: 'C' }, createTextNode('C')),
    createElement('li', { key: 'D' }, createTextNode('D'))
);
const app = document.querySelector('#app');
mount(app, oldVnode);
document.querySelector('#push')
    .addEventListener('click', () => {
        const newVnode = createElement('ul', {},
        createElement('li', { key: 'A' }, createTextNode('A')),
        createElement('li', { key: 'B' }, createTextNode('B')),
        createElement('li', { key: 'C' }, createTextNode('C')),
        createElement('li', { key: 'D' }, createTextNode('D')),
        createElement('li', { key: 'E' }, createTextNode('E')),
        createElement('li', { key: 'F' }, createTextNode('F'))
        );
        patch(oldVnode, newVnode);
    });